package com.eonmind.ai.dto;

import com.eonmind.ai.core.video.platform.pixverse.enums.PixverseModelEnum;
import com.eonmind.common.contract.data.request.PageRequest;
import com.eonmind.common.contract.enums.ai.AiVideoStatusEnum;
import com.eonmind.common.contract.timer.Timer;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
import org.apache.logging.log4j.core.config.plugins.validation.constraints.NotBlank;

public class AiVideoDto {
    /**
     * 提交视频任务响应
     */
    @Data
    @ToString
    @AllArgsConstructor
    @NoArgsConstructor
    public static class AiVideoTaskSubmitResponse {
        /**
         * 视频id
         */
        private Long videoId;
    }

    @Data
    @ToString
    public static class PixverseTaskSubmitRequest {
        /**
         * 平台
         *
         * @mock 1
         */
        private Integer platform = 1;

        /**
         * 模型
         */
        private PixverseModelEnum model = PixverseModelEnum.v3;
        /**
         * 提示词
         */
        @NotBlank
        private String prompt;
        /**
         * 尺寸
         */
        private String radio = "16:9";
    }


    @Data
    @ToString
    public static class PixverseTaskQueryRequest {
        /**
         * 视频id
         */
        private Long videoId;

    }

    @Data
    @ToString
    public static class VideoTaskQueryResponse {
        /**
         * 视频任务id
         */
        private Long id;

        /**
         * 用户ID
         */
        private Long userId = 0L;

        /**
         * 模型ID
         */
        private Integer platformId = 0;

        /**
         * 第三方返回的任务ID
         */
        private String taskId = "";


        /**
         * 视频地址
         */
        private String videoUrl = "";

        /**
         * 封面地址
         */
        private String poster = "";

        /**
         * 视频任务Prompt
         */
        private String prompt = "";

        /**
         * 视频任务Negative Prompt
         */
        private String negativePrompt = "";

        /**
         * 视频任务模板ID
         */
        private String templateId = "";

        /**
         * 视频任务比例
         */
        private String radio = "16:9";

        /**
         * 模型
         */
        private String model = "";

        /**
         * 视频任务状态
         */
        private Integer status = AiVideoStatusEnum.PENDING_GENERATION.getCode();

        /**
         * 视频任务状态描述
         */
        private String statusDesc = AiVideoStatusEnum.PENDING_GENERATION.getDesc();

        /**
         * 创建时间
         */
        private Long createTime = Timer.currentTimestamp();

        /**
         * 更新时间
         */
        private Long updateTime = Timer.currentTimestamp();

    }

    @Data
    @ToString
    public static class VideoTaskPageQueryResponse {
        private PageRequest page = new PageRequest();
    }
}
